package com.hh.common.enums;

public enum ProductRecommend {
    SUPERIORPRODUCTSRECOMMEND("superiorProductsRecommend", "优品推荐"),
    RECOMMENDEDFORYOU("recommendedForYou", "为你推荐"),
    HOTPRODUCTS("hotProducts", "火热爆品"),
    SPECIALOFFERZONE("specialOfferZone", "特惠专区"),
    UNKNOWN("N", "未知");

    private final String type;
    private final String info;


    public static ProductRecommend getByType(String type) {
        for (ProductRecommend productRecommend : ProductRecommend.values()) {
            if (productRecommend.type.equals(type)) {
                return productRecommend;
            }
        }
        return UNKNOWN;
    }

    private ProductRecommend(String type, String info) {
        this.type = type;
        this.info = info;
    }

    public String getType() {
        return this.type;
    }

    public String getInfo() {
        return this.info;
    }
}
